using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using IGlobalist.Cms.Bll;
using IGlobalist.Cms.Model;
using IGlobalist.Cms.Common;
using System.Net.Mail;

namespace IGlobalist.Cms
{
    public partial class Contact : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request["sendmail"] == "1")
                {
                    //string email = Request["sEmail"];
                    //string name = Request["sName"];
                    //string title = Request["sTitle"];
                    //string content = Request["sQuestion"];
                    //string body = "<b>"+title+ ": <b><br>" + content;
                    //MailAddress from = new MailAddress(email);
                    //MailAddress to = new MailAddress("smpt.gmail.com");
                    //MailMessage msg = new MailMessage();
                    //msg.Body = body;
                    //msg.From = from;
                    //msg.To.Add(to);
                    //msg.Subject = "Subject: EducationServer.org support";

                    //SmtpClient oMail = new SmtpClient();
                    //oMail.Send(msg);                    

                    long pid = 0;
                    pid = Convert.ToInt64(Request["pid"]);
                    string path = pid + "_0_0/default.aspx";
                    Response.Redirect(path);

                }
            }
        }
    }
}
